package com.mt.service.impl;

import com.mt.mapper.CinemaScheduleMapper;
import com.mt.service.CinemaHallService;
import com.mt.service.CinemaScheduleService;
import com.mt.service.CinemaSeatService;
import junit.framework.TestCase;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;

/**
 * @author Wang
 * @Description
 * @date 2020/12/23-1:06
 */
@SpringBootTest
@RunWith(SpringRunner.class)
public class test extends TestCase {


    @Resource
    CinemaHallService hallService;
    @Resource
    CinemaScheduleMapper scheduleMapper;
    @Resource
    CinemaSeatService seatService;

    @Resource
    CinemaScheduleService scheduleService;
    @Test
    public void  test3(){
        seatService.defaultSeat2Hall(1,6,10);
    }


    @Test
    public void test2() {
      //  List<String> list = scheduleMapper.getScheduleDateList(1, 1);
        boolean b = scheduleService.checkScheduleExpire(1);
        System.out.println(b);

//        System.out.println(scheduleMapper.listCinemaScheduleByFilm(1));
    }

    @Test
    public void test() {
//        CinemaHall form = new CinemaHall();
//        form.setHallType(HallType.CGS);
//        ObjectMapper mapper = new ObjectMapper();
//        List<CinemaHall >forms= hallService.listHall(1);
//        String mapJakcson = null;
//        try {
//            mapJakcson = mapper.writeValueAsString(forms);
//        } catch (JsonProcessingException e) {
//            e.printStackTrace();
//        }
//        System.out.println(mapJakcson);
        //System.out.println(hallService.listAllHall(1));
    }
}